import http from './http'
/**
 * 体检套餐详细
 *
 * @author twt
 * @since 2025-04-14 16:26:54
 */
//user
//通过ID查询单条数据
export const queryById = (id: number) => {
  return http.get(`/medicalPackages/${id}`)
}

//admin
//更新数据
export const update = (data: {
  packageId: number
  packageName: string
  description: string
  price: number
  institutionId: number
}) => {
  return http.put('/medicalPackages', data)
}
//删除数据
export const deleteById = (id: number) => {
  return http.delete(`/medicalPackages/${id}`)
}
//全部查询
export const queryAll = () => {
  return http.get(`/medicalPackages`)
}
//发布套餐
export const add = (data: {
  packageName: string
  description: string
  price: number
  institutionId: number
}) => {
  return http.post('/medicalPackages', data)
}
